﻿

using HBase;
using Net.http;
using System;
using System.Collections.Generic;
namespace hconnect {
    public class MongoLogTask :ZtTask {

        IMServer mServer = GuidangFactray.getDal<IMServer>();

        long emplyTime = DateTime.Now.Ticks;
        protected override bool init() {
            time = 2000;
            return true;
        }

       
        public override bool excute() {
            String time = DateTime.Now.ToString("yyyyMM");
            Dictionary<string ,List<object>> dict = GuidangCache.getAllMongoData();
            foreach( var t in dict ) {
                mServer.InsertBatch(t.Key+ time,t.Value);
            }

            String name = "status" + time;
            mServer.InsertBatch(name, StatusCache.getDef());
            return true;
        }



    }
}
